﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

namespace XmlDSigEx
{
    class AttributeOrderComparer:IComparer<XmlAttribute>
    {
        #region IComparer<XmlAttribute> Members

        public int Compare(XmlAttribute x, XmlAttribute y)
        {
            int nsComparison = string.Compare(x.NamespaceURI, y.NamespaceURI);
            if (nsComparison != 0)
                return nsComparison;
            return string.Compare(x.LocalName, y.LocalName);
        }

        #endregion
    }
}
